/*
 *所有关于MaterialProduct类的业务代码应在此处编写
*可使用repository.调用常用方法，获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*MaterialProductService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using System.Linq;
using VOL.Core.Utilities;
using System.Linq.Expressions;
using VOL.Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using MyMES.IRepositories;
using MyMES.Dto;
using MyMES.Infrastructure;
using MyMES.Repositories;
using MyMes.Infrastructure;

namespace MyMES.Services
{
    public partial class MaterialProductService
    {
        private readonly IBaseRepository<MaterialProduct> _materialProductRepository;

        public MaterialProductService(IBaseRepository<MaterialProduct> materialProductRepository)
        {
            _materialProductRepository = materialProductRepository;
        }

        /// <summary>
        /// 获取物料信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public async Task<List<MaterialProduct>> GetMaterialProductList()
        {
            var list = _materialProductRepository.GetAll();

            return list.ToList();
        }
    }
}
